package org.example.service.Impl;


import org.example.bean.User;
import org.example.mapper.UserDao;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class UserServise {
    @Autowired
    UserDao userDao;
    public List<User> getAll() {
        return userDao.list();
    }
    public void del(int id){
        userDao.del(id);
    };
    public void add(User user){userDao.add(user);};
    public void update(User user){userDao.update(user);}
    public User getUserByUsername(String uname) {
        return userDao.getUserByUsername(uname);
    }
}

